package beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.faces.model.SelectItem;

public class DiasSemana implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	private String[] dias;
	private int [] horas;
	private List<SelectItem> dia;
	private List<SelectItem> hora;
	
	//contructor
	
	public DiasSemana(){}
	
	//getters y setters
	
	public String[] getDias(){
		return dias;
	}
	public int[] getHoras(){
		return horas;
	}
	
	public void setDias(String[] dias) {

        this.dias = dias;

    }
	public void setHoras(int[] horas) {

        this.horas = horas;

    }
	
	
	public List<SelectItem> getDia() {

        if(dia == null || dia.size() == 0){

        	dia = new ArrayList<SelectItem>();
        	dia.add(new SelectItem("Lunes", "Lunes"));
        	dia.add(new SelectItem("Martes", "Martes"));
        	dia.add(new SelectItem("Miercoles", "Miercoles"));
        	dia.add(new SelectItem("Jueves", "Jueves"));
        	dia.add(new SelectItem("Viernes", "Viernes"));
        	dia.add(new SelectItem("Sabado", "Sabado"));
        	dia.add(new SelectItem("Domingo", "Domingo"));
        	

        }

        return dia;
	}
	
	public List<SelectItem> getHora() {

        if(hora == null || hora.size() == 0){

        	hora = new ArrayList<SelectItem>();
        	
        	for (int i=0; i<12; i++)
        		hora.add(new SelectItem(""+(i+12), ""+(i+12)));
        	
        	      	       	

        }

        return hora;
	}
	
	public void setDia(List<SelectItem> dia) {

        this.dia = dia;

    }
	
	public void setHora(List<SelectItem> hora) {

        this.hora = hora;

    }
	
	

}
